package com.ruoyi.commodity.mapper;

import com.ruoyi.commodity.domain.ProductImage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Admin
* @description 针对表【tb_product_image(商品图片表)】的数据库操作Mapper
* @createDate 2024-11-12 18:27:33
* @Entity com.ruoyi.commodity.domain.ProductImage
*/
@Mapper
public interface ProductImageMapper extends BaseMapper<ProductImage> {

	/**
	 * 批量添加商品图片
	 * @param productImages
	 * @return
	 */
	int insertBatch(@Param("list") List<ProductImage> productImages);


	/**
	 * 根据 product_id 查询对应的图片路径列表
	 * @param productId
	 * @return
	 */
	List<ProductImage> selectProductImagesByProductId(@Param("productIds") List<Long> productId);
}




